Mobile phones provided with a navigation function utilizing GPS (Global Positioning System) to display a geographical position of the present location have been put into practical use. In this type of mobile phone, generally a geomagnetism sensor is mounted. It is possible to display a bearing together with the present location. For example, by the so-called “heading up” display method rotating a display direction of a map to match an advancing direction may be used to display the present position and the advancing direction in a manner easily understandable to a user.
A geomagnetism sensor uses, for example, a magnetoresistance device or other magnetism detection device to detect the intensity of geomagnetism in a plurality of directions (usually biaxial directions or triaxial directions). However, geomagnetism is very weak, therefore a detection value of a geomagnetism sensor is easily affected by other magnetism. In particular, magnetism generated in parts inside an electronic apparatus in which a geomagnetism sensor is mounted becomes a major cause of error of the detection value of the geomagnetism. The magnetism generated inside an electronic apparatus creates a constant magnetic field inside the electronic apparatus no matter which direction the electronic apparatus is directed in, therefore this causes a fixed error (offset) in the detection value of the geomagnetism. In order for the geomagnetism sensor to detect the geomagnetism with a good precision, calibration for estimating this offset and eliminating it from the detection value of the sensor becomes indispensable. Patent Documents 1 to 8 disclose technologies concerning calibration of a geomagnetism sensor mounted in a portable electronic apparatus.    Patent Document 1: Japanese Patent Publication (A) No. 2005-291931    Patent Document 2: Japanese Patent Publication (A) No. 2005-291932    Patent Document 3: Japanese Patent Publication (A) No. 2005-291933    Patent Document 4: Japanese Patent Publication (A) No. 2005-291934    Patent Document 5: Japanese Patent Publication (A) No. 2005-291935    Patent Document 6: Japanese Patent Publication (A) No. 2005-291936    Patent Document 7: Japanese Patent Publication (A) No. 2005-291937    Patent Document 8: Japanese Patent Publication (A) No. 2005-291938